import store from '../store/index.js'
export const auth = ()=>{
	let userInfo = store.state.user.userInfo
	console.log(123,userInfo);
	if(!userInfo){
		uni.showModal({
			title:'温馨提示',
			content:"您只有先登录才能进行您的操作",
			cancelText:'稍后再说',
			confirmText:'立即登录',
			confirmColor:'orange',
			success: ({confirm}) => {
				if(confirm){
					uni.navigateTo({
						url:'/sub_pages01/login/login'
					})
				}else{
					uni.switchTab({
						url:'/pages/index/index'
					})
				}
			}
		})
	}
}